Skip to main content

🧰 Try Catch

The Try Catch action allows you to implement error handling in your Pageflows by defining blocks of code or actions to try and specifying how to catch and handle errors if they occur.


Configuration​

  • Enable Finally: Optionally enable the Finally block, which will execute actions regardless of whether the try block succeeds or an error is caught.

Features​

  • Supports structured error handling within Pageflows.
  • Allows executing alternative actions when an error occurs.
  • Optionally runs cleanup or finalization steps with the Finally block.
  • Improves Pageflows robustness and error resilience.

Use Cases​

  • Handle errors gracefully during API calls or data processing.
  • Execute fallback or recovery actions on failure.
  • Ensure cleanup or logging actions run regardless of success or failure.
  • Build more reliable and maintainable Pageflows.

Notes​

  • The Try block contains the main actions to attempt.
  • The Catch block handles any errors thrown by the Try block.
  • The Finally block runs after Try or Catch, regardless of outcome.
  • Enable the Finally option only if you have actions to run always.

Tip: Use Try Catch to make your Pageflows fault-tolerant and easier to debug.